3.1.67 \(\int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx\) [67]

3.1.67.1 Optimal result
3.1.67.2 Mathematica [A] (verified)
3.1.67.3 Rubi [A] (verified)
3.1.67.4 Maple [A] (verified)
3.1.67.5 Fricas [B] (verification not implemented)
3.1.67.6 Sympy [F]
3.1.67.7 Maxima [A] (verification not implemented)
3.1.67.8 Giac [A] (verification not implemented)
3.1.67.9 Mupad [B] (verification not implemented)

3.1.67.1 Optimal result

Integrand size = 23, antiderivative size = 105 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {(a-b)^2 \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{7/2} f}-\frac {(a-b)^2 \cot (e+f x)}{a^3 f}-\frac {(2 a-b) \cot ^3(e+f x)}{3 a^2 f}-\frac {\cot ^5(e+f x)}{5 a f} \]

output
-(a-b)^2*cot(f*x+e)/a^3/f-1/3*(2*a-b)*cot(f*x+e)^3/a^2/f-1/5*cot(f*x+e)^5/ 
a/f-(a-b)^2*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))*b^(1/2)/a^(7/2)/f
 
3.1.67.2 Mathematica [A] (verified)

Time = 1.27 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.98 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\frac {-15 (a-b)^2 \sqrt {b} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )-\sqrt {a} \cot (e+f x) \left (8 a^2-25 a b+15 b^2+a (4 a-5 b) \csc ^2(e+f x)+3 a^2 \csc ^4(e+f x)\right )}{15 a^{7/2} f} \]

input
Integrate[Csc[e + f*x]^6/(a + b*Tan[e + f*x]^2),x]
 
output
(-15*(a - b)^2*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]] - Sqrt[a]*Co 
t[e + f*x]*(8*a^2 - 25*a*b + 15*b^2 + a*(4*a - 5*b)*Csc[e + f*x]^2 + 3*a^2 
*Csc[e + f*x]^4))/(15*a^(7/2)*f)
 
3.1.67.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4146, 364, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (e+f x)^6 \left (a+b \tan (e+f x)^2\right )}dx\)

\(\Big \downarrow \) 4146

\(\displaystyle \frac {\int \frac {\cot ^6(e+f x) \left (\tan ^2(e+f x)+1\right )^2}{b \tan ^2(e+f x)+a}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 364

\(\displaystyle \frac {\int \left (\frac {\cot ^6(e+f x)}{a}+\frac {(2 a-b) \cot ^4(e+f x)}{a^2}+\frac {(a-b)^2 \cot ^2(e+f x)}{a^3}-\frac {(a-b)^2 b}{a^3 \left (b \tan ^2(e+f x)+a\right )}\right )d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {\sqrt {b} (a-b)^2 \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{7/2}}-\frac {(a-b)^2 \cot (e+f x)}{a^3}-\frac {(2 a-b) \cot ^3(e+f x)}{3 a^2}-\frac {\cot ^5(e+f x)}{5 a}}{f}\)

input
Int[Csc[e + f*x]^6/(a + b*Tan[e + f*x]^2),x]
 
output
(-(((a - b)^2*Sqrt[b]*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/a^(7/2)) - ( 
(a - b)^2*Cot[e + f*x])/a^3 - ((2*a - b)*Cot[e + f*x]^3)/(3*a^2) - Cot[e + 
 f*x]^5/(5*a))/f
 

3.1.67.3.1 Defintions of rubi rules used

rule 364
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), 
x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x 
] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In 
tegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4146
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ 
)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[c*(ff^(m + 1)/f)   Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 
2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x 
] && IntegerQ[m/2]
 
3.1.67.4 Maple [A] (verified)

Time = 1.13 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {-\frac {1}{5 a \tan \left (f x +e \right )^{5}}-\frac {2 a -b}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {a^{2}-2 a b +b^{2}}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (a^{2}-2 a b +b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{a^{3} \sqrt {a b}}}{f}\) \(99\)
default \(\frac {-\frac {1}{5 a \tan \left (f x +e \right )^{5}}-\frac {2 a -b}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {a^{2}-2 a b +b^{2}}{a^{3} \tan \left (f x +e \right )}-\frac {b \left (a^{2}-2 a b +b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{a^{3} \sqrt {a b}}}{f}\) \(99\)
risch \(\frac {2 i \left (15 a b \,{\mathrm e}^{8 i \left (f x +e \right )}-15 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}-90 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+60 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-80 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+160 a b \,{\mathrm e}^{4 i \left (f x +e \right )}-90 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+40 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-110 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+60 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}-8 a^{2}+25 a b -15 b^{2}\right )}{15 f \,a^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{5}}-\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{2 a^{2} f}+\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right ) b}{a^{3} f}-\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right ) b^{2}}{2 a^{4} f}+\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{2 a^{2} f}-\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right ) b}{a^{3} f}+\frac {\sqrt {-a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right ) b^{2}}{2 a^{4} f}\) \(467\)

input
int(csc(f*x+e)^6/(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)
 
output
1/f*(-1/5/a/tan(f*x+e)^5-1/3*(2*a-b)/a^2/tan(f*x+e)^3-(a^2-2*a*b+b^2)/a^3/ 
tan(f*x+e)-b*(a^2-2*a*b+b^2)/a^3/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/ 
2)))
 
3.1.67.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 227 vs. \(2 (93) = 186\).

Time = 0.32 (sec) , antiderivative size = 543, normalized size of antiderivative = 5.17 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\left [-\frac {4 \, {\left (8 \, a^{2} - 25 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 20 \, {\left (4 \, a^{2} - 11 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} - 2 \, a b + b^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a^{2} + a b\right )} \cos \left (f x + e\right )^{3} - a b \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}} \sin \left (f x + e\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) + 60 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )}{60 \, {\left (a^{3} f \cos \left (f x + e\right )^{4} - 2 \, a^{3} f \cos \left (f x + e\right )^{2} + a^{3} f\right )} \sin \left (f x + e\right )}, -\frac {2 \, {\left (8 \, a^{2} - 25 \, a b + 15 \, b^{2}\right )} \cos \left (f x + e\right )^{5} - 10 \, {\left (4 \, a^{2} - 11 \, a b + 6 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} - 2 \, a b + b^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 30 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )}{30 \, {\left (a^{3} f \cos \left (f x + e\right )^{4} - 2 \, a^{3} f \cos \left (f x + e\right )^{2} + a^{3} f\right )} \sin \left (f x + e\right )}\right ] \]

input
integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="fricas")
 
output
[-1/60*(4*(8*a^2 - 25*a*b + 15*b^2)*cos(f*x + e)^5 - 20*(4*a^2 - 11*a*b + 
6*b^2)*cos(f*x + e)^3 - 15*((a^2 - 2*a*b + b^2)*cos(f*x + e)^4 - 2*(a^2 - 
2*a*b + b^2)*cos(f*x + e)^2 + a^2 - 2*a*b + b^2)*sqrt(-b/a)*log(((a^2 + 6* 
a*b + b^2)*cos(f*x + e)^4 - 2*(3*a*b + b^2)*cos(f*x + e)^2 + 4*((a^2 + a*b 
)*cos(f*x + e)^3 - a*b*cos(f*x + e))*sqrt(-b/a)*sin(f*x + e) + b^2)/((a^2 
- 2*a*b + b^2)*cos(f*x + e)^4 + 2*(a*b - b^2)*cos(f*x + e)^2 + b^2))*sin(f 
*x + e) + 60*(a^2 - 2*a*b + b^2)*cos(f*x + e))/((a^3*f*cos(f*x + e)^4 - 2* 
a^3*f*cos(f*x + e)^2 + a^3*f)*sin(f*x + e)), -1/30*(2*(8*a^2 - 25*a*b + 15 
*b^2)*cos(f*x + e)^5 - 10*(4*a^2 - 11*a*b + 6*b^2)*cos(f*x + e)^3 - 15*((a 
^2 - 2*a*b + b^2)*cos(f*x + e)^4 - 2*(a^2 - 2*a*b + b^2)*cos(f*x + e)^2 + 
a^2 - 2*a*b + b^2)*sqrt(b/a)*arctan(1/2*((a + b)*cos(f*x + e)^2 - b)*sqrt( 
b/a)/(b*cos(f*x + e)*sin(f*x + e)))*sin(f*x + e) + 30*(a^2 - 2*a*b + b^2)* 
cos(f*x + e))/((a^3*f*cos(f*x + e)^4 - 2*a^3*f*cos(f*x + e)^2 + a^3*f)*sin 
(f*x + e))]
 
3.1.67.6 Sympy [F]

\[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=\int \frac {\csc ^{6}{\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]

input
integrate(csc(f*x+e)**6/(a+b*tan(f*x+e)**2),x)
 
output
Integral(csc(e + f*x)**6/(a + b*tan(e + f*x)**2), x)
 
3.1.67.7 Maxima [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.99 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {15 \, {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{3}} + \frac {15 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{4} + 5 \, {\left (2 \, a^{2} - a b\right )} \tan \left (f x + e\right )^{2} + 3 \, a^{2}}{a^{3} \tan \left (f x + e\right )^{5}}}{15 \, f} \]

input
integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="maxima")
 
output
-1/15*(15*(a^2*b - 2*a*b^2 + b^3)*arctan(b*tan(f*x + e)/sqrt(a*b))/(sqrt(a 
*b)*a^3) + (15*(a^2 - 2*a*b + b^2)*tan(f*x + e)^4 + 5*(2*a^2 - a*b)*tan(f* 
x + e)^2 + 3*a^2)/(a^3*tan(f*x + e)^5))/f
 
3.1.67.8 Giac [A] (verification not implemented)

Time = 0.48 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.36 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {15 \, {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{\sqrt {a b} a^{3}} + \frac {15 \, a^{2} \tan \left (f x + e\right )^{4} - 30 \, a b \tan \left (f x + e\right )^{4} + 15 \, b^{2} \tan \left (f x + e\right )^{4} + 10 \, a^{2} \tan \left (f x + e\right )^{2} - 5 \, a b \tan \left (f x + e\right )^{2} + 3 \, a^{2}}{a^{3} \tan \left (f x + e\right )^{5}}}{15 \, f} \]

input
integrate(csc(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="giac")
 
output
-1/15*(15*(a^2*b - 2*a*b^2 + b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + a 
rctan(b*tan(f*x + e)/sqrt(a*b)))/(sqrt(a*b)*a^3) + (15*a^2*tan(f*x + e)^4 
- 30*a*b*tan(f*x + e)^4 + 15*b^2*tan(f*x + e)^4 + 10*a^2*tan(f*x + e)^2 - 
5*a*b*tan(f*x + e)^2 + 3*a^2)/(a^3*tan(f*x + e)^5))/f
 
3.1.67.9 Mupad [B] (verification not implemented)

Time = 10.73 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.10 \[ \int \frac {\csc ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx=-\frac {\frac {1}{5\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (2\,a-b\right )}{3\,a^2}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2-2\,a\,b+b^2\right )}{a^3}}{f\,{\mathrm {tan}\left (e+f\,x\right )}^5}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )\,{\left (a-b\right )}^2}{\sqrt {a}\,\left (a^2-2\,a\,b+b^2\right )}\right )\,{\left (a-b\right )}^2}{a^{7/2}\,f} \]

input
int(1/(sin(e + f*x)^6*(a + b*tan(e + f*x)^2)),x)
 
output
- (1/(5*a) + (tan(e + f*x)^2*(2*a - b))/(3*a^2) + (tan(e + f*x)^4*(a^2 - 2 
*a*b + b^2))/a^3)/(f*tan(e + f*x)^5) - (b^(1/2)*atan((b^(1/2)*tan(e + f*x) 
*(a - b)^2)/(a^(1/2)*(a^2 - 2*a*b + b^2)))*(a - b)^2)/(a^(7/2)*f)